function main(params) {
    debugger
    const element = this;
    const recId = params.rec_id.value
    const applicationId = element.state.applicationId;
    const tokenKey = `${applicationId}:access_token`;
    const casKey = `${applicationId}:cas_access_token`;
    const token = getParameter('token') || localStorage.getItem(casKey) || localStorage.getItem(tokenKey) || "";
    //egova_token=R8LAbod3JBIbII8emu14fkXl2xw&readonly=1#/case-detail?recId=256
    ///
    let url = `/mjing/mj/third.html#/law-rec-detail?recId=${recId}&egova_token=${token}&readonly=1`
    window.open(url, "_self");

}

/**
 * 截取参数
 */
function getParameter(key) {
    const reg = new RegExp("(^|&)" + key + "=([^&]*)(&|$)");
    const match = window.location.href.match(reg);

    if (match) {
        return unescape(match[2]);
    }
    return null;
}